package com.six.sixbrush.controller;


import com.six.sixbrush.selenium.Six;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/v1/brush")
public class BrushController {

    @Autowired
    private Six six;

    @GetMapping("/open")
    public void open() {
        six.openBrowser("http://8.134.170.231:15113/");
    }

    @GetMapping("/getBet")
    public void getBet() {
        try {
            six.getBet();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    @GetMapping("/doBet")
    public void doBet() {
        six.memberBetMain();
    }

    @GetMapping("/proxy")
    public void proxyLogin() {
        six.setProxyTab();
    }

    @GetMapping("/member")
    public void memberLogin() {
        six.setMemberTab();
    }
}
